package com.qmds.deviceserver.device.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmds.common.core.entity.Device;
import com.qmds.deviceserver.device.vo.DevicePageVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * --- 代码敲烂 月薪过万 ---
 *
 * @author ShiJiaWei
 * @date 2024/9/7
 * @desc:
 */
public interface DeviceMapper extends BaseMapper<Device> {

    Page<DevicePageVO> selectDeviceOfPage(Page<DevicePageVO> page, @Param(Constants.WRAPPER) QueryWrapper<DevicePageVO> wrapper);

    @MapKey("id")
    List<Map<String, Object>> findStatusForCharts(@Param("tid") Integer tid);

}
